<template>
    <div>
        <h1>News</h1>
        <router-link :to="'/news/today/'+idd">今日新闻</router-link>
             <!-- <router-link :to="'/news/yesterday/'+id">昨日重现</router-link> -->
             <button @click="old">旧闻</button>
              <!-- 参数：{{$route.params}} -->
          
             <router-view></router-view>
    </div>
</template>
<script>
export default {
    data(){
        return{
           id:8989,
          idd:123
        }
    },
    methods:{
        old(){
            // this.$router.push("/news/yesterday")
            this.$router.push( '/news/yesterday/'+this.id)
    //    this.$router.push({path:`/news/yesterday/${this.id}`})
    // this.$router.replace({path:`/news/yesterday/${this.id}`})
    // this.$router.go(-1)
       }
    }
  
}
</script>
